﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QLCHBANGIAY.DATA
{
    public class Shoppingcart
    {

        //private List<Product> products = new List<Product>();
        //private long total;

        //public void add(Product product){
        //    if(products.Contains(product) == false){
        //        products.Add(product);
        //    }else {
        //        for(int i=0; i < products.Count; i++){
        //            Product item = products.get(i);
        //            if(item.equals(product)){
        //                products.get(i).setCounter(products.get(i).getCounter()+1);
        //            }
        //        }
        //    }
        //}
        //public List<Product> getProducts() {
        //    return products;
        //}
        //public void setProducts(List<Product> products) {
        //    this.products = products;
        //}
        //public int counter(){
        //    return products.Count;
        //}
        //public double sum(){
        //    double sum = 0;
        //    for(int i=0; i < products.Count; i++){
        //        Product item = products.get(i);
        //        sum += item.getPrice() * item.getCounter();
        //    }
        //    return sum;
        //}

    }
}
